/**
 * This is a generated class and is not intended for modification.  To customize behavior
 * of this service wrapper you may modify the generated sub-class of this class - StockMaster.as.
 */
package com.service
{
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper;
import com.adobe.serializers.utility.TypeUtility;
import com.model.valueObjects.VoTrasactionMaster;
import mx.rpc.AbstractOperation;
import mx.rpc.AsyncToken;
import mx.rpc.remoting.Operation;
import mx.rpc.remoting.RemoteObject;

import mx.collections.ItemResponder;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;

[ExcludeClass]
internal class _Super_StockMaster extends com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper
{

    // Constructor
    public function _Super_StockMaster()
    {
        // initialize service control
        _serviceControl = new mx.rpc.remoting.RemoteObject();

        // initialize RemoteClass alias for all entities returned by functions of this service
        com.model.valueObjects.VoTrasactionMaster._initRemoteClassAlias();

        var operations:Object = new Object();
        var operation:mx.rpc.remoting.Operation;

        operation = new mx.rpc.remoting.Operation(null, "updateStock");
         operation.resultType = String;
        operations["updateStock"] = operation;
        operation = new mx.rpc.remoting.Operation(null, "addNewTransaction");
         operation.resultType = String;
        operations["addNewTransaction"] = operation;
        operation = new mx.rpc.remoting.Operation(null, "editTransaction");
         operation.resultType = String;
        operations["editTransaction"] = operation;
        operation = new mx.rpc.remoting.Operation(null, "deleteTransaction");
         operation.resultType = String;
        operations["deleteTransaction"] = operation;
        operation = new mx.rpc.remoting.Operation(null, "getAllTransactions");
         operation.resultElementType = com.model.valueObjects.VoTrasactionMaster;
        operations["getAllTransactions"] = operation;

        _serviceControl.operations = operations;
        _serviceControl.convertResultHandler = com.adobe.serializers.utility.TypeUtility.convertResultHandler;
        _serviceControl.source = "StockMaster";
        _serviceControl.endpoint = "gateway.php";
        destination = "StockMaster";



         model_internal::initialize();
    }

    /**
      * This method is a generated wrapper used to call the 'updateStock' operation. It returns an mx.rpc.AsyncToken whose 
      * result property will be populated with the result of the operation when the server response is received. 
      * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
      * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
      *
      * @see mx.rpc.AsyncToken
      * @see mx.rpc.CallResponder 
      *
      * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
      */
    public function updateStock(pro_serialnumber:int, qty:int, type:String) : mx.rpc.AsyncToken
    {
        var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("updateStock");
        var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(pro_serialnumber,qty,type) ;

        return _internal_token;
    }
     
    /**
      * This method is a generated wrapper used to call the 'addNewTransaction' operation. It returns an mx.rpc.AsyncToken whose 
      * result property will be populated with the result of the operation when the server response is received. 
      * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
      * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
      *
      * @see mx.rpc.AsyncToken
      * @see mx.rpc.CallResponder 
      *
      * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
      */
    public function addNewTransaction(VObject:com.model.valueObjects.VoTrasactionMaster) : mx.rpc.AsyncToken
    {
        var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("addNewTransaction");
        var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(VObject) ;

        return _internal_token;
    }
     
    /**
      * This method is a generated wrapper used to call the 'editTransaction' operation. It returns an mx.rpc.AsyncToken whose 
      * result property will be populated with the result of the operation when the server response is received. 
      * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
      * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
      *
      * @see mx.rpc.AsyncToken
      * @see mx.rpc.CallResponder 
      *
      * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
      */
    public function editTransaction(VObject:com.model.valueObjects.VoTrasactionMaster) : mx.rpc.AsyncToken
    {
        var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("editTransaction");
        var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(VObject) ;

        return _internal_token;
    }
     
    /**
      * This method is a generated wrapper used to call the 'deleteTransaction' operation. It returns an mx.rpc.AsyncToken whose 
      * result property will be populated with the result of the operation when the server response is received. 
      * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
      * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
      *
      * @see mx.rpc.AsyncToken
      * @see mx.rpc.CallResponder 
      *
      * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
      */
    public function deleteTransaction(trans_serialnumber_fk:int) : mx.rpc.AsyncToken
    {
        var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("deleteTransaction");
        var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(trans_serialnumber_fk) ;

        return _internal_token;
    }
     
    /**
      * This method is a generated wrapper used to call the 'getAllTransactions' operation. It returns an mx.rpc.AsyncToken whose 
      * result property will be populated with the result of the operation when the server response is received. 
      * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
      * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
      *
      * @see mx.rpc.AsyncToken
      * @see mx.rpc.CallResponder 
      *
      * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
      */
    public function getAllTransactions() : mx.rpc.AsyncToken
    {
        var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getAllTransactions");
        var _internal_token:mx.rpc.AsyncToken = _internal_operation.send() ;

        return _internal_token;
    }
     
}

}
